package com.wkbb.common.enums;

public enum AddressListEnum {
    //删除和用户相关的通讯录缓存(type:2:家长通讯录,3:老师通讯录,1园长通讯录)
    /**
     * 园长通讯录
     */
    PRINCIPAL(1,"园长通讯录"),
    /**
     * 家长通讯录
     */
    FAMILY(2,"家长通讯录"),
    /**
     * 老师通讯录
     */
    TEACHER(3,"老师通讯录");

    private AddressListEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (AddressListEnum addressListEnum : AddressListEnum.values()) {
            if (addressListEnum.getValue().intValue()==value) {
                return addressListEnum.getDesc();
            }
        }
        return null;
    }
}
